Skip to content

Conversation

@0xFirekeeper
Copy link
Member

@0xFirekeeper 0xFirekeeper commented Dec 25, 2024

Closes #109


PR-Codex overview

This PR updates the ERC721_TotalSupply method in the ThirdwebExtensions class to improve error handling and change the logic for retrieving the total supply of tokens.

Detailed summary

  • Changed the null check for contract to an if statement with a throw.
  • Added a try-catch block to attempt reading nextTokenIdToMint.
  • In case of an exception, it falls back to reading totalSupply.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 25.00000% with 6 lines in your changes missing coverage. Please review.

Project coverage is 78.00%. Comparing base (79f6f92) to head (b971fa5).

Files with missing lines Patch % Lines
Thirdweb/Thirdweb.Extensions/ThirdwebExtensions.cs 25.00% 5 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #112      +/-   ##
==========================================
- Coverage   78.01%   78.00%   -0.01%     
==========================================
  Files          28       28              
  Lines        4698     4705       +7     
  Branches      639      639              
==========================================
+ Hits         3665     3670       +5     
- Misses        859      861       +2     
  Partials      174      174              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@0xFirekeeper 0xFirekeeper merged commit 2010084 into main Dec 25, 2024
1 check passed
@0xFirekeeper 0xFirekeeper deleted the firekeeper/erc721-nexttokenidtomint branch December 25, 2024 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ERC721_GetOwnedNFTs() => Empty

3 participants